package com.siyoumi.app.modules.sms.vo;

import com.siyoumi.validator.annotation.HasAnyText;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.HashMap;
import java.util.Map;

//发短信
@Data
@Accessors(chain = true)
public class VoSmsSend {
    @HasAnyText(message = "miss sms_id")
    private String sms_id;
    @HasAnyText(message = "miss uid")
    private String uid;
    private String phone;

    private Map<String, String> replaceArr = new HashMap<>();

    static public VoSmsSend of(String smsId, String uid) {
        VoSmsSend vo = new VoSmsSend();
        vo.setSms_id(smsId);
        vo.setUid(uid);
        return vo;
    }

    public void addReplace(String key, String val) {
        getReplaceArr().put(key, val);
    }

    public void addReplace(Map<String, String> map) {
        getReplaceArr().putAll(map);
    }
}
